From: Karl Heuer Date: Wed, 2 Feb 1994 07:25:37 +0000 (+0000) Subject: (try_window_id): Don't pass value beyond ZV to compute_motion. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~93321 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6a1dc7ac28663a6b63aa55d0000228882d4d4b97;p=emacs.git (try_window_id): Don't pass value beyond ZV to compute_motion. --- diff --git a/src/xdisp.c b/src/xdisp.c index 2dbbbabb0d0..2fd2e6ee629 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1425,13 +1425,13 @@ try_window_id (window) if (Z - GPT < end_unchanged) end_unchanged = Z - GPT; - if (beg_unchanged + 1 < start) + if (beg_unchanged + BEG < start) return 0; /* Give up if changes go above top of window */ /* Find position before which nothing is changed. */ bp = *compute_motion (start, 0, lmargin, - beg_unchanged + 1, height + 1, 0, width, hscroll, - pos_tab_offset (w, start)); + min (ZV, beg_unchanged + BEG), height + 1, 0, + width, hscroll, pos_tab_offset (w, start)); if (bp.vpos >= height) { if (point < bp.bufpos && !bp.contin)